package routerServer

import (
	"fmt"
	"gitee.com/fierce_wolf/go-fox-edge-common/commEnv"
	"log"
)

type routerServer struct {
}

func (e *routerServer) startServer() {
	// 注册路由：静态的auth路由和redis中的service们的路由
	auth.registerRouter()
	router.registerRouter()

	// 启动服务
	serverPort := fmt.Sprintf(":%v", commEnv.Service.AppPort)
	if err := engine.Run(serverPort); err != nil {
		log.Fatalf("Failed to start server: %v", err)
	}
}
